#include "Clock.hpp"
#include "Utils.hpp"
#include "Player.hpp"
#include "Monsters.hpp"
#include "MonsterFactory.hpp"
#include "CombatManager.hpp"
#include <iostream>

using std::cout;
using std::cin;
using std::endl;
using namespace MonsterFactory;

int main() {

  Clock* clock = Clock::GetInstance();
  Player* player = Player::GetInstance();
  CombatManager* combatMgr = CombatManager::GetInstance();

  cout << "MONSTER FACTORY 1.0\n";
  cout << "-> Guides:\n";
  cout << "   This games presents a demo for abstract factory pattern.\n";
  cout << "   Factories and products are implemented in MonsterFactory.*pp and Monsters.*pp respectively.\n";
  cout << "   We provide three maps here, the first and second ones provide different playing ways.\n";
  cout << "   The third one is combined mode of map1 and map2 with map1 in hard mode.\n";
  cout << "   Play just follow the guide in different maps. Enjoy.\n\n";
  cout << "-> Select the map:\n 1. BTP Garden [default]\n 2. Netease Farm\n 3. Instance Zone [hard]\n";

  bool result = false;  
  int choice;  
  cin >> choice;
  switch(choice) {
  case 1:
    result = combatMgr->BTPGarden(player);
    break;
  case 2:
    result = combatMgr->NeteaseFarm(player);
    break;
  case 3:
    result = combatMgr->InstanceZone(player);
    break;
  default:
    result = combatMgr->BTPGarden(player);
    break;
  }
  player->PrintPlayer();

#ifndef LINUX
  system("pause");
#endif
  return 0;
}

